<template>
  <div>
    <ul>
      <template v-if="store.getList.length > 0">
        <li v-for="item in store.getList" :key="item.pid">
          {{ item.pid }} -- {{ item.ptime }} -- {{ item.paddr }} -- {{ item.price }}
        </li>
      </template>

      <template v-else>
        <li>暂无数据</li>
      </template>
     
    </ul>
  </div>
</template>

<script setup>
import useStore from './store';
import { onMounted } from 'vue';

const store = useStore();

onMounted(()=>{
  /* store.$patch(state=>{
    state.list = [...state.originList];
  }) */

  store.$patch(state=>{
      console.log('store.getLocalList=>',store.getLocalList);
      state.list = store.getLocalList;
  })
});


</script>

<style scoped>

</style>